package cn.ulc.store.dao.user;

import cn.ulc.common.constant.enums.AvailableStatus;
import cn.ulc.store.dao.BaseDao;
import cn.ulc.store.entity.user.Member;
import org.beetl.sql.core.annotatoin.SqlResource;
import org.beetl.sql.core.engine.PageQuery;

import java.util.List;
import java.util.Map;

/*
* Member
* gen by Jin mapper 2019-05-29
*/
@SqlResource("user.member")
public interface MemberDao extends BaseDao<Member> {

    PageQuery findListPage(PageQuery pageQuery);

    Member findByPhone(Long companyId,String phone);

    Member findByWxUserId(Long wxUserId, AvailableStatus status);
    Member findByWxUserId(Long wxUserId);


    Map<String,Object> findStat(Long companyId, String beginDate, String endDate,AvailableStatus status);

    Map<String,Object> findTodayOrderStat(Long companyId);

    List<Member> findList(Long companyId);

    //AVAILABLE 查询所有的有效会员
    List<Member> findListByStatus(AvailableStatus status);


}
